package cums.db.impl;

import cums.db.iface.CusgrpDao;
import cums.db.pers.Cusgrp;
import java.util.List;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

/**
 * @time Dec 9, 2009, 1:30:10 PM
 * @author fdcube
 */
public class CusgrpImpl extends HibernateDaoSupport implements CusgrpDao {

    public Cusgrp AddOrUpdateCusgrp(Cusgrp value) {
        this.getHibernateTemplate().saveOrUpdate(value);
        return value;
    }

    public boolean DeleteCusgrp(Cusgrp value) {
        try {
            this.getHibernateTemplate().delete(value);
            return true;
        } catch (DataAccessException dataAccessException) {
            logger.error(dataAccessException);
            return false;
        }
    }
}
